﻿

<style>
    * {
        margin: 0 auto;
        padding: 0;
        text-align: center;
    }
</style>
<div class="CountDiv">
    <div><h1>培训记录表</h1></div>
    <div><span>参与培训人员</span></div>
    <div>
        <form action="" method="post">

            <table border="1" style="border-collapse:collapse;width:60%;height:80%">
                <tr>
                    <th>培训地点</th>
                    <th><input type="text" name="" /></th>
                    <th>培训方式</th>
                    <th>@Html.DropDownList("TrainMethod_Id")</th>
                </tr>

                <tr>
                    <th>培训时间</th>
                    <th><input type="text" name="" /></th>
                    <th>培训讲师</th>
                    <th><input type="text" name="" /></th>
                </tr>

                <tr>
                    <th>培训名称</th>
                    <th colspan="3"><input type="text" name="" /></th>
                </tr>
                <tr>

                    <th colspan="4">参加培训人员</th>
                </tr>
                <tr>
                    <td colspan="4" style="height:40%;">

                        <table border="1" style="border-collapse:collapse;float:left;width:48%">
                            <tr>
                                <th>序号</th>
                                <th>姓名</th>
                                <th>工种</th>

                            </tr>
                            <tbody id="OddData"></tbody>
                        </table>
                        <table border="1" style="border-collapse:collapse;float:left;margin-left:10px;width:48%">
                            <tr>
                                <th>序号</th>
                                <th>姓名</th>
                                <th>工种</th>

                            </tr>
                            <tbody id="EvenData"></tbody>
                        </table>
                    </td>
                </tr>



            </table>
        </form>
    </div>

</div>
<script>
    $(function () {
        GetDataRoction();
    })
    function GetDataRoction() {

        $.ajax({
            url: "/TrainRoced/TrainRecorLis1",
            type: "Get",
            success: function (obj) {

                obj = eval(obj);
                $("#EvenData").empty();
                $("#OddData").empty();

                for(var i=0;i<obj.length;i++)
                {
                    if(i%2==0)
                    {
                        $("#OddData").append("<tr><td>" + obj[i].TrainRecord_GUId + "</td><td>" + obj[i].TrainRecord_Name + "</td><td>" + obj[i].TrainRecord_Cost + "</td></tr>")

                    }
                    else{
                        $("#EvenData").append("<tr><td>" + obj[i].TrainRecord_GUId + "</td><td>" + obj[i].TrainRecord_Name + "</td><td>" + obj[i].TrainRecord_Cost + "</td></tr>")
                    }



                }

            }
        })

    }
   

</script>